﻿using System.Windows;
using System;

namespace Inovout.Portal.Desktop.Workbenchs
{
    internal class WorkbenchBehavior
    {
        private Window window;
        internal WorkbenchBehavior(Window window)
        {
            this.window = window;
            foreach(string resourceDictionaryUriString in WpfApplication.resourceDictionaryUris )
            {
            ResourceDictionary resourceDictionary = new ResourceDictionary();
            resourceDictionary.Source = new Uri(resourceDictionaryUriString       , UriKind.Relative);
            window.Resources.MergedDictionaries.Add(resourceDictionary);
            }
        }
        internal void ShowDialog(bool isModal)
        {
            if (isModal)
            {
                window.ShowDialog();
            }
            else
            {
                window.Show();
            }
        }
    }
}
